﻿#ifndef IMAGEVIEWER_H
#define IMAGEVIEWER_H

#include "head/g_pch.h"
#include "m_fhs.h"

namespace Ui {
class ImageViewer;
}

class ImageViewer : public QDialog
{
    Q_OBJECT

public:
    explicit ImageViewer(QWidget *parent, const QString &label);
    ~ImageViewer();

    bool isEmpty();
    void getImageList(const QString &label);
    void playNext();
    void playPrevious();
    void viewFirst();
    void showPixmap(const QString &filePath);

protected:
    void resizeEvent(QResizeEvent *);
    void mouseDoubleClickEvent(QMouseEvent *);
    void wheelEvent(QWheelEvent *event);

private:
    Ui::ImageViewer *ui;

    QString table;
    QString _label;
    QString imgLocator;
    QStringList imgList;
    QPixmap pix;
};

#endif // IMAGEVIEWER_H
